# Uncomment the following line for Solaris
# C_LINK = -lsocket -lnsl -lm

# Uncomment this for SCO.  (Note, this has only been reported to work with
# Revision 3.2.4 with the "SCO TCP/IP Development System" package installed.
# Please let me know if you have any other SCO success stories.
# C_LINK = -lsocket

C_FLAGS = -I. -I/usr/local/tams/src/comm/include -I/usr/local/mysql/include -L/usr/local/tams/src/comm/lib -L/usr/local/mysql/lib

MYSQL= -lmysqlclient
TLIB= -ltlib
CGI= /usr/local/tams/src/comm/lib/cgihtml.a
CGIOBJS = string-lib.o cgi-llist.o cgi-lib.o html-lib.o

BINARYS = login_post logout login_info

# Comment the following line if you are not using the gnu c compiler
C_ARGS = -Wall

# You might have to change this if your c compiler is not cc
CC = gcc
RANLIB = ranlib

.o:
	$(CC) -c $(C_FLAGS) $*

all: $(BINARYS)
#	cp html/* /usr/local/tips_stcall/htdocs/session

login_post: cgi/login_post.c
	$(CC) -o  login_post cgi/login_post.c  $(TLIB) $(CGI) $(C_FLAGS) $(C_LINK) $(MYSQL)
	strip login_post
	cp login_post /usr/local/tips_stcall/cgi-bin/session

logout: cgi/logout.c
	$(CC) -o  logout cgi/logout.c  $(TLIB) $(CGI) $(C_FLAGS) $(C_LINK) $(MYSQL)
	strip logout
	cp logout /usr/local/tips_stcall/cgi-bin/session

login_info: cgi/login_info.c
	$(CC) -o  login_info cgi/login_info.c  $(TLIB) $(CGI) $(C_FLAGS) $(C_LINK) $(MYSQL)
	strip login_info
	cp login_info /usr/local/tips_stcall/cgi-bin/session

clean: 
	rm $(BINARYS)
